package com.lv.utils.controller;

import com.lv.utils.pojo.Cron;
import com.lv.utils.restartTask.ConfigTask;
import com.lv.utils.service.CronService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: Lv_sc
 * Date:     2021/3/29 14:38
 * Description: 描述
 */
@RestController
@RequestMapping("/cron")
public class CronController {


    private static Logger logger = LoggerFactory.getLogger(ConfigTask.class);

    @Autowired
    CronService cronService;
    /**
     * @MethodName:
     * 〈功能详细描述〉
     * Description: DOTO
     * @Param:
     * @Author Lv_sc
     * @Data 2021/3/29 14:39
     * @Return
     */
    @RequestMapping("/addCron")
    public  String addCron(@RequestBody Cron cron){

        int i = cronService.insertCron(cron);
        return "success";
    }


}